<?php

namespace app\api\controller\intelligentlive;

use app\api\service\intelligentlive\DataService;
use think\Request;

class Data
{
    protected $Service;
    public function __construct()
    {
        $this->Service = DataService::getInstance();
    }

    public function setData(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->setData($params);
        return writeJson(200,$result,"数据更新完成");
    }

    public function getData(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->getData($params);
        return writeJson(200,$result,"获取数据完成");
    }
}